package rostering;
import JaCoP.constraints.Sum;
import JaCoP.core.BooleanVar;
import JaCoP.core.IntVar;
import JaCoP.core.Store;


public class WorkerB extends Worker {
	public WorkerB(Store store, int workerNbr){
		super(store);
		for(IntVar day : daysWorkingList){
			day.id +="B"+workerNbr;
		}
		nbrOfDaysWorking=new IntVar(this.store, "WorkerB"+workerNbr, 4,4);
		BooleanVar[] daysWorkingArray=new BooleanVar[daysWorkingList.size()];
		daysWorkingList.toArray(daysWorkingArray);
		Sum sum = new Sum(daysWorkingArray,nbrOfDaysWorking);
		this.store.impose(sum);
		
		addConsecutiveConstraints(daysWorkingArray, "WorkerBConsec"+workerNbr, 3);
	}
}
